package win.itshen.cloud.adminlte.modules.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import win.itshen.cloud.adminlte.common.entity.SuperEntity;

import java.util.List;

/**
 * <p>
 * 系统菜单表
 * </p>
 *
 * @author luckyxz999
 * @since 2017-09-19
 */
@Data
@TableName("sys_menu")
public class SysMenu extends SuperEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 父节点ID
     */
    @TableField("parent_id")
    private Long parentId;
    /**
     * 类型 1-菜单 2-权限/按钮
     */
    private Integer type;
    /**
     * 菜单/权限名称
     */
    private String name;
    /**
     * 菜单链接
     */
    private String href;
    /**
     * 菜单链接目标，如_blank、_self等
     */
    private String target;
    /**
     * 排序序号
     */
    @TableField("order_no")
    private Integer orderNo;
    /**
     * 图标
     */
    private String icon;
    /**
     * 权限标识
     */
    private String permission;
    /**
     * 状态 0-隐藏 1-显示
     */
    private Integer status;

    @TableField(exist = false)
    private List<SysMenu> childList;

}
